﻿<%@ Control Language="c#" AutoEventWireup="false" Inherits="Web.Control.WWW.Resources.ResourcesPageManage" %>
<div id="Body">
	<div id="CommonCenter">
		<div id="Center9001">
			<div id="Title">
				<div class="H1">Resources Administration</div>
				<div class="Menu"><a href="/resources/admin/reslistadmin.htm"><%if(Page.Request.RawUrl.ToLower().IndexOf("/resources/admin/reslistadmin.htm")>-1){%><strong>Resources List</strong><%} else{%>Resources List<%}%></a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="/resources/admin/resdetail.htm"><%if(Page.Request.RawUrl.ToLower().IndexOf("/resources/admin/resdetail.htm")>-1){%><strong>Add a New Resource</strong><%} else{%>Add a New Resource<%}%></a></div>
			</div>
			<div id="Center9001Left">
			</div>
			<div id="Center9001Right">
				<div id="Center9001Content">
					<p>
						<strong>Page title:</strong><br />
						<input id="txtPageTitle" type="text" class="common300" value="<%=PageTitle %>" />
						<span name="__V_S" vt="0" elt1="txtPageTitle" reg=".{1,50}" style="color:Red;display:none" class="validMsg"><br />Please enter the resource name.</span>
					</p>
					<p>
						<strong>For learning:</strong><br />
						<select id="SelectLearn" class="common300">
					        <%if (AdminAllLearn==true) {%>
					        <%=GetLanguageSelect(LearnLan)%>
					        <%}
                            else{%>
                            <option value="<%=LearnLan %>"><%=GetLanguageText(LearnLan)%></option>
                            <%} %>
					    </select>
					</p>
					<p>
						<strong>Base language:</strong><br />
						<select id="SelectBase" class="common300">
					        <%if (AdminAllBase==true) {%>
					        <%=GetLanguageSelect(BaseLan)%>
					        <%}
                            else{%>
                            <option value="<%=BaseLan %>"><%=GetLanguageText(BaseLan)%></option>
                            <%} %>
					    </select>
					</p>
					<p>
						<strong>Description</strong><br />
						<textarea id="txtDes" class="common300" cols="" rows=""><%=Desc%></textarea>
						<span name="__V_S" vt="0" elt1="txtDes" reg="[\s\S]{0,1000}" style="color:Red;display:none" class="validMsg"><br />error.</span>
					</p>
					<p>
					    <input id="btnSubmit" type="button" value="Save" class="button" onclick="Save()" />
					</p>
					<div id="Succeed" style="display:none">Submitted Successfully</div>
                    <div id="failure" style="display:none">Submitted failing</div>					
				</div>
			</div>
			<div class="clear"></div>
		</div>
	</div>
</div>
<%--
var Page_Validators =  new Array($get("valtxtPageTitle"), $get("valtxtDes"));
var TmpObj = $get("valtxtPageTitle");
TmpObj.controltovalidate = "txtPageTitle";
TmpObj.errormessage = "<b>Please enter the resource name.</b>";
TmpObj.display = "None";
TmpObj.evaluationfunction = "RegularExpressionValidatorEvaluateIsValid";
TmpObj.validationexpression = ".{1,50}";

TmpObj = $get("valtxtDes");
TmpObj.controltovalidate = "txtDes";
TmpObj.errormessage = "<b>error.</b>";
TmpObj.display = "None";
TmpObj.evaluationfunction = "RegularExpressionValidatorEvaluateIsValid";
TmpObj.validationexpression = "[\\s\\S]{0,1000}";

var Page_ValidationActive = false;
if (typeof(ValidatorOnLoad) == "function") {
    ValidatorOnLoad();
}
function ValidatorOnSubmit() {
    if (Page_ValidationActive) {
        return ValidatorCommonOnSubmit();
    }
    else {
        return true;
    }
}
function CreateValid()
{
    $create(AjaxControlToolkit.ValidatorCalloutBehavior, 
    {"closeImageUrl":"<%=RootPath%>Scripts/AjaxTools/images/close.gif","highlightCssClass":"validatorCalloutHighlight",
     "id":"valtxtPageTitle","warningIconImageUrl":"<%=RootPath%>Scripts/AjaxTools/images/alert-small.gif"}, null, null, $get("valtxtPageTitle"));
    $create(AjaxControlToolkit.ValidatorCalloutBehavior, 
    {"closeImageUrl":"<%=RootPath%>Scripts/AjaxTools/images/close.gif","highlightCssClass":"validatorCalloutHighlight",
     "id":"valtxtDes","warningIconImageUrl":"<%=RootPath%>Scripts/AjaxTools/images/alert-small.gif"}, null, null, $get("valtxtDes"));    
}
<span id="valtxtPageTitle" style="color: Red; display: none;" class="red10"></span>
<span id="valtxtDes" style="color: Red; display: none;" class="red10"></span>
--%>
<script>
var Memberno = "<%=memberno %>";
var SaveType = <%=SaveType %>;
var PageID = <%=PageID %>;
</script>
